library(tidyverse)1 Get started
We will again use the penguins data included in R.
As always, before you get started with the exercise, make sure that you load the tidyverse
2 Compare the flipper length of penguins using statistical tests
Question: Does the mean flipper length differ between the 3 penguin species?
Do separate comparisons for
- Gentoo vs. Adelie
- Gentoo vs. Chinstrap
- Adelie vs. Chinstrap
Before you start, create a subset of each species as a vector.
For this, you can use the $ operator:
adelie <- filter(penguins, species == "Adelie")$flipper_len
chinstrap <- filter(penguins, species == "Chinstrap")$flipper_len
gentoo <- filter(penguins, species == "Gentoo")$flipper_lenFollow the decision tree for statistical tests:
3 Extra
Create a plot to show the results of your tests. Choose one of the following:
- Create a boxplot with notches to visually compare differences in flipper length between species
- Make a plot showing the mean and standard error of the mean as pointrange or point with errorbars
Add a geom_signif() layer to the plot you just created to indicate your test results